﻿using Microsoft.SharePoint;

namespace TennisSite
{
    public static class ListExtentions
    {
        public static SPList GetListByName(this SPWeb web, string listName)
        {
            SPList result = null;

            try
            {
                result = web.Lists[listName];
            }
            catch
            {
                return null;
            }

            return result;
        }
    }
}